---@class BuffEffect10 : BaseBuffEffect
BuffEffect10 = ClientFight.CreateClass("BuffEffect10", ClientFight.BaseBuffEffect)
local t = BuffEffect10

---@param fight Fight
---@param buff FighterBuff
function t:action(fight, buff, ...)
    local parameters = { ... }
    if (self:isDamageActionTrigger(buff)) then
        local isBuff = parameters[4];
        if (isBuff) then
            return IBuffEffect.FAIL;
        end
    end
    local calculatorType = buff.buffBean.f_BuffEffectValue[1];
    local damageType = buff.buffBean.f_BuffEffectValue[2];
    local calculateAttrType = buff.buffBean.f_BuffEffectValue[3];
    local bonus = buff.buffBean.f_BuffEffectValue[4] * buff.overlay
    local modifiedRatio = buff.buffBean.f_BuffEffectValue[5] * buff.overlay
    local calculator = calculatorType == 0 and buff.source or buff.target

    local result = AttackUtils.calculateEffectDamage(buff.source, buff.target, damageType, calculator, calculateAttrType, modifiedRatio, bonus);
    DamageManager.realDamage(fight, buff.source, buff.target, buff.modelId, result, damageType);

    SkillRoleMgr.savePathFile( "[" .. fight.frame .. "][EFFECT]Fighter " .. buff.target.fighterId .. " Buff"
    .. buff.modelId .. " 触发伤害，伤害值：" .. result.damage);
    return ClientFight.BaseBuffEffect.action(self,fight, buff, parameters);
end

t.New()